Constructor (object-oriented programming)
SPECIAL METHOD USED FOR INITIALIZING A NEWLY ALLOCATED OBJECT IN OBJECT-ORIENTED PROGRAMMING
Ctor; Constructor function; Constructor (programming); Constructor (computing); CTOR; Constructor (computer science); Move constructor; Instance constructor; Static constructor; .ctor; .cctor; Copy constructor; Comparison of programming languages (OOP, constructors)
In class-based, object-oriented programming, a constructor (abbreviation: ctor) is a special type of subroutine called to create an object. It prepares the new object for use, often accepting arguments that the constructor uses to set required member variables.